package com.iris.live.services.data.repositories;

import com.iris.live.services.data.models.CrmTopicLogModel;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by lusong on 2016/11/24.
 */
public interface CrmTopicLogRepository extends JpaRepository<CrmTopicLogModel, Integer>, JpaSpecificationExecutor<CrmTopicLogModel> {

    @Query("select a from CrmTopicLogModel a where a.permit =?1 order by a.updateTime desc")
    List<CrmTopicLogModel> queryLogByPermit(String permit);
}
